import  httpService  from "./http.service";
class BookingService {
  async getAllBookings() {
    const url = `booking/bookings`;
    return httpService.get(url);
  }

  async createBooking(booking) {
    return await httpService.post("booking/create", booking);
  }

  async updateBooking(booking) {
    return await httpService.put("booking/update", booking);
  }

  async deleteBooking(bookingId) {
    return await httpService.delete(`booking/bookings/${bookingId}`);
  }
}

export const bookingService = new BookingService();